﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain.Entities;
using Domain.Service;
using Domain.Core.Extensions;
using System.Data.Objects.DataClasses;
using Domain.Core.Specification;
using Domain.Service.System;
using Domain.Core;

namespace Infrastructure.System
{
    /// <summary>
    /// 基础设施中的Repository按着领域模块去创建，而不是按着表去创建
    /// </summary>
    public class UserRepository : BackgroundRepository<WebManageUsers>, IUserRepository
    {
        public UserRepository()
        {
        }
        public UserRepository(IUnitOfWork iUnitOfWork)
            : base(iUnitOfWork)
        {

        }
        public IQueryable<WebManageUsers> GetWebManageUsers()
        {
            return base.GetEntities();
        }
        public IQueryable<WebManageUsers> GetWebManageUsers(ISpecification<WebManageUsers> specification)
        {
            return base.GetEntities(specification);
        }

        public WebManageUsers GetWebManageUsers(WebManageUsers entity)
        {
            return base.Find(entity.ManageUserID);
        }


    }
}
